﻿using EasyAdmin.Domain.Entities.Systems;
using EasyAdmin.Domain.Shared.Enums;
using EasyCore.ObjectMapper;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyAdmin.Application.Contracts.Systems.Menus.Dtos
{
    [MapFrom(typeof(SysMenu))]
    [MapTo(typeof(SysMenu))]
    public class MenuOutput
    {
        /// <summary>
        /// 菜单唯一标识
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 父菜单唯一标识
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 路由路径：主要用于VUE单页面应用【用于访问页面】
        ///</summary>
        public string RoutePath { get; set; }

        /// <summary>
        /// 组件路径：页面的实际路径
        /// </summary>
        public string ComponentPath { get; set; }

        /// <summary>
        /// 菜单类项：目录、页面
        /// </summary>
        public MenuType MenuType { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 菜单是否显示
        /// </summary>
        public bool IsShow { get; set; }

        /// <summary>
        /// 是否是首页
        /// </summary>
        public bool IsHome { get; set; }

        /// <summary>
        /// 激活状态
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int OrderSort { get; set; }

        /// <summary>
        /// 当前页面的操作按钮列表
        /// </summary>
        public List<MenuOperationOutput> MenuOperations { get; set; }

        public List<MenuOutput> Children { get; set; }

    }
}
